package com.zr.storelocal.controller;

import com.zr.storelocal.model.StoreLocalAddVo;
import com.zr.storelocal.model.StoreLocalUpdateVo;
import com.zr.storelocal.service.StoreLocalService;
import com.zr.util.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;
import java.util.List;

/**
 * @ClassName storeLocalController
 * @Description TODO
 * @Author xiaowei
 * @Date 2020/1/7 16:59
 * @Version 1.0
 */
@RestController
@CrossOrigin
public class storeLocalController {
    @Autowired
    private StoreLocalService storeLocalService;
    //库位添加
    @PostMapping("storeLocal/add")
    public ResultVo storeLocalAdd(@RequestBody @Valid StoreLocalAddVo storeLocalAddVo){
        return storeLocalService.storeLocalAdd(storeLocalAddVo);
    }
    //库位修改
    @PostMapping("storeLocal/update")
    public ResultVo storeLocalUpdate(@RequestBody @Valid StoreLocalUpdateVo storeLocalUpdateVo){
        return storeLocalService.storeLocalUpdate(storeLocalUpdateVo);
    }

}
